package cn.edu.njuit.server.ugcnote.ugcnoteserver.service.impl;

import cn.edu.njuit.server.ugcnote.ugcnoteserver.entity.TypeInfo;
import cn.edu.njuit.server.ugcnote.ugcnoteserver.repository.TypeInfoRepository;
import cn.edu.njuit.server.ugcnote.ugcnoteserver.service.TypeInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeInfoServiceImpl implements TypeInfoService {
    private final TypeInfoRepository typeInfoRepository;

    public TypeInfoServiceImpl(TypeInfoRepository typeInfoRepository) {
        this.typeInfoRepository = typeInfoRepository;
    }

    @Override
    public List<TypeInfo> getAllTypes() {
        return this.typeInfoRepository.findAllTypes();
    }
}
